package task

import ext.log
import manager.AppManager
import manager.HttpRequestManager
import manager.StatusManager

class StatusChangedUploadTask : Runnable {
    override fun run() {
        try {
            val json = StatusManager.status.toJson()
            json.put("macAddr", AppManager.MacAddress)
            val content = json.toString()
            log("-及时状态--$content")
            val ret = HttpRequestManager.uploadStatusWithChanged(content)
            log("---$ret")
        } catch (e: Exception) {
            e.printStackTrace()
        }
    }
}